package com.mall.b2c.domain.order;

import java.math.BigDecimal;
import java.util.Set;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.mall.common.domain.AreaDomain;
import com.mall.common.domain.BaseEntity;

/**
 * 发货单
 * 
 * @author lzx
 *
 */
@Entity
@Table(name = "b2c_shipping")
public class ShippingDomain extends BaseEntity {

	private static final long serialVersionUID = 5316207311233070872L;

	private String sendSn;// 发货单编号
	private String logisticsNo;// 物流单号
	private String receiver;// 收货人
	private String district;// 地区
	private String address;// 地址
	private String telephone;// 电话
	private String mobile;// 手机
	private String zipCode;// 邮编
	private String deliveryMethodName;// 配送方式名称
	private BigDecimal shipFee;// 物流费用
	private String remarks;// 备注
	private String operator;// 操作人

	private AreaDomain area;// 地区
	private OrderDomain order;// 订单
	private Set<ShippingItemDomain> shippingItems; // 发货项

	public String getSendSn() {
		return sendSn;
	}

	public void setSendSn(String sendSn) {
		this.sendSn = sendSn;
	}

	public String getLogisticsNo() {
		return logisticsNo;
	}

	public void setLogisticsNo(String logisticsNo) {
		this.logisticsNo = logisticsNo;
	}

	public String getReceiver() {
		return receiver;
	}

	public void setReceiver(String receiver) {
		this.receiver = receiver;
	}

	public String getDistrict() {
		return district;
	}

	public void setDistrict(String district) {
		this.district = district;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getTelephone() {
		return telephone;
	}

	public void setTelephone(String telephone) {
		this.telephone = telephone;
	}

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public String getZipCode() {
		return zipCode;
	}

	public void setZipCode(String zipCode) {
		this.zipCode = zipCode;
	}

	public String getDeliveryMethodName() {
		return deliveryMethodName;
	}

	public void setDeliveryMethodName(String deliveryMethodName) {
		this.deliveryMethodName = deliveryMethodName;
	}

	public BigDecimal getShipFee() {
		return shipFee;
	}

	public void setShipFee(BigDecimal shipFee) {
		this.shipFee = shipFee;
	}

	public String getRemarks() {
		return remarks;
	}

	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}

	public String getOperator() {
		return operator;
	}

	public void setOperator(String operator) {
		this.operator = operator;
	}

	@ManyToOne(fetch=FetchType.LAZY)
	public AreaDomain getArea() {
		return area;
	}

	public void setArea(AreaDomain area) {
		this.area = area;
	}

	@ManyToOne(fetch=FetchType.LAZY)
	public OrderDomain getOrder() {
		return order;
	}

	public void setOrder(OrderDomain order) {
		this.order = order;
	}

	@OneToMany(fetch=FetchType.LAZY, mappedBy="shipping")
	public Set<ShippingItemDomain> getShippingItems() {
		return shippingItems;
	}

	public void setShippingItems(Set<ShippingItemDomain> shippingItems) {
		this.shippingItems = shippingItems;
	}

}
